﻿
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WinnerCMS.Data.Mapping
{
    public partial class GoodsPartMap
        : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<WinnerCMS.Model.GoodsPart>
    {
        public GoodsPartMap()
        {
            // table
            //ToTable("CMS_GoodsPart");

            // keys
            HasKey(t => t.Id);

            // Properties
            Property(t => t.Id)
                
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity)
                .IsRequired();
            Property(t => t.ParentId)
                
                .IsOptional();
            Property(t => t.GoodsId)
                
                .IsOptional();

            // Relationships

            //InitializeMapping();
        }
    }
}

